import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('@/views/layout/index'),
    children: [
      {
        path: '/success',
        component: () => import('@/views/userOrder')
      },
      {
        path: 'dashbord',
        component: () => import('@/views/dashbord')
      },
      {
        path: 'userorder',
        component: () => import('@/views/userOrder')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
